import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/awad',
    children:[
        {path: '/awad', component: () => import('../views/outpatient/AWADView.vue')},
        {path: '/bim', component: () => import('../views/InpatientDepartment/BIMView')},
        {path: '/inventory', component: () => import('../views/inventory/inventory.vue')},
        {path: '/money', component: () => import('../views/expensesettlement/ExpenseSettlementView.vue')},
        {path: '/doctor', component: () => import('../views/doctor/DoctorView')},
        {path: '/prescribe', component: () => import('../views/inventory/PrescribeView')},
        {path: '/inventory', component: () => import('../views/inventory/inventory.vue')},
        {path: '/hosppm', component: () => import('../views/ipmt/hospmgmt/hosppm.vue')},
        {path: '/hosppd', component: () => import('../views/ipmt/hospmgmt/hosppd.vue')}


    ]
  },
    {path: '/login', component: () => import('../views/LoginView')}

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
